@@ -26,7 +26,7 @@ module Agents |
||
26 | 26 |
|
27 | 27 |
def default_options |
28 | 28 |
{ |
29 |
- 'property' => 'output', |
|
29 |
+ 'property' => '{{output}}', |
|
30 | 30 |
'expected_update_period_in_days' => 1 |
31 | 31 |
} |
32 | 32 |
end |
@@ -49,16 +49,15 @@ describe Agents::ChangeDetectorAgent do |
||
49 | 49 |
|
50 | 50 |
it "is when event created within :expected_update_period_in_days" do |
51 | 51 |
@checker.options[:expected_update_period_in_days] = 2 |
52 |
- three_days_from_now = 1.days.from_now |
|
53 | 52 |
@checker.should be_working |
54 | 53 |
end |
55 | 54 |
|
56 | 55 |
it "isnt when event created outside :expected_update_period_in_days" do |
57 | 56 |
@checker.options[:expected_update_period_in_days] = 2 |
58 |
- three_days_from_now = 2.days.from_now |
|
59 |
- stub(Time).now { three_days_from_now } |
|
60 | 57 |
|
61 |
- @checker.should_not be_working |
|
58 |
+ time_travel_to 2.days.from_now do |
|
59 |
+ @checker.should_not be_working |
|
60 |
+ end |
|
62 | 61 |
end |
63 | 62 |
end |
64 | 63 |
|